package com.mask.im.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author jian
 */

@Getter
@AllArgsConstructor
public enum RecoverAccountEnum {
    PHONE_RECOVER_ACCOUNT("phoneRecoverAccount", "phoneAccountRecoveryImpl"),
    EMAIL_RECOVER_ACCOUNT("emailRecoverAccount", "emailAccountRecoveryImpl");

    private final String type;

    private final String executor;

    public static String execute(String type) {
        for (RecoverAccountEnum value : RecoverAccountEnum.values()) {
            if (type != null && type.equals(value.type)) {
                return value.executor;
            }
        }
        return null;
    }
}
